//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package io.openinstall.unityplugin;

import android.app.ActivityManager;
import android.app.Application;
import android.app.ActivityManager.RunningAppProcessInfo;
import android.os.Process;
import com.fm.openinstall.OpenInstall;
import java.util.Iterator;

public class OiApplication extends Application {
    public OiApplication() {
    }

    private boolean isMainProcess() {
        int var1 = Process.myPid();
        Iterator var2 = ((ActivityManager)this.getSystemService("activity")).getRunningAppProcesses().iterator();

        while(var2.hasNext()) {
            RunningAppProcessInfo var3 = (RunningAppProcessInfo)var2.next();
            if (var3.pid == var1) {
                return this.getApplicationInfo().packageName.equals(var3.processName);
            }
        }

        return false;
    }

    public void onCreate() {
        super.onCreate();
        if (this.isMainProcess()) {
            OpenInstall.init(this);
        }

    }
}
